<template>
  <a-row class="message">
    <a-col :md="8" v-for="(k, v) in 3" :key="v" class="message_box">
      <div
        v-for="(item, index) in message"
        :key="index"
        class="message_box_content"
      >
        <p class="title">{{ item.title }}</p>
        <div class="content">{{ item.content }}</div>
      </div>
    </a-col>
  </a-row>
</template>

<script>
import { marketNews } from "@/api/assets";
export default {
  name: "Message",
  data() {
    return {
      message: null,
    };
  },
  mounted() {
    marketNews().then((res) => {
      //   console.log(res);
      this.message = res.result.records;
    });
  },
};
</script>

<style lang="scss" scoped>
.message {
  background: #f3f3f3;
  border-radius: 5px;
  padding: 4px;
  .message_box {
    padding: 6px 4px;
    // box-shadow: 2px 5px 5px #ccc;
    .message_box_content {
        cursor: pointer;
      background: #fff;
      padding: 6px 16px;
      margin-bottom: 8px;
      &:hover{
          transition: .2s;
          background: #f3f3f3;
      }
      .title {
          
        text-align: left;
        font-size: 14px;
        margin-bottom: 8px;
      }
      .content {
        text-align: left;
        font-size: 12px;
      }
    }
  }
}
</style>